<template>
	<view class="message-list">
		<u-list width="100%" @scrolltolower="scrolltolower">
			<u-list-item v-for="(item, index) in list" :key="index">
				<u-cell :title="item.content" :url="'/pages/message/detail?id=' + item.id" isLink>
					<text slot="value">{{item.createTime | dateFormat}}</text>
				</u-cell>
			</u-list-item>
		</u-list>
		<tabBar />
	</view>
</template>
<script>
	import moment from 'moment'
	import API from '@/api'
	export default {
		data() {
			return {
				list: []
			}
		},
		created() {
			this.load()
		},
		methods: {
			load() {
				let params = {}
				API.message.getListPage(params).then((res) => {
					this.list = res.data.list
				})
			}
		}
	}
</script>
<style scoped lang="scss">
	.message-list {
		background-color: #f8f8f8;
		min-height: 100vh;
		padding-bottom: 120rpx;
	}
</style>